agent: For SSH key, don't put NUL-byte at the end.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 21 May 2019 06:50:28 +0000 (15:50 +0900)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Thu, 22 Aug 2019 19:11:59 +0000 (20:11 +0100)
commit74397ce95ba4a5a16e38439d2bfc52e6f3046712
tree0cb4c3766553d10c8bbc3c9fe5509e0295b656da
parent78b641ec1afec951466d0f640c52a7dad6cdad5c
agent: For SSH key, don't put NUL-byte at the end.

* agent/command-ssh.c (ssh_key_to_protected_buffer): Update
the length by the second call of gcry_sexp_sprint.

--

GnuPG-bug-id: 4502
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
(cherry picked from commit 6e39541f4f488fe59eac399bad18c465f373a784)

Gbp-Pq: Topic from-2.2.16
Gbp-Pq: Name agent-For-SSH-key-don-t-put-NUL-byte-at-the-end.patch
agent/command-ssh.c